package leetcode.code074;

import leetcode.IDebug;
import leetcode.helper.HelpDebug;

public abstract class Solution074 implements IDebug {
	abstract public boolean searchMatrix(int[][] matrix, int target);

	@Override
	public void debug1() {
		String str = "[[1,3,5,7],[10,11,16,20],[23,30,34,60]]";
		int target = 3;
		boolean expect = true;
		this.debug(str, target, expect);
	}

	private void debug(String str, int target,boolean expect) {
		int[][] matrix = HelpDebug.str2array1(str);
		boolean result = this.searchMatrix(matrix, target);
		HelpDebug.compare(expect, result);
	}

	@Override
	public void debug2() {
		String str = "[[1,3,5,7],[10,11,16,20],[23,30,34,60]]";
		int target = 13;
		boolean expect = false;
		this.debug(str, target, expect);
	}

	@Override
	public void debug3() {
		// TODO Auto-generated method stub

	}

	@Override
	public void debug4() {
		// TODO Auto-generated method stub

	}

}
